package com.gzhryc.shared_device.oem.code.member.dao.db;

import com.gzhryc.jdbc.annotaion.Column;
import com.gzhryc.jdbc.annotaion.DateBranchTable;
import com.gzhryc.jdbc.annotaion.Id;
import com.gzhryc.jdbc.annotaion.Table;
import com.gzhryc.shared_device.oem.code.member.dao.enums.MemberVerificationVoucherEnum;

import java.util.Date;

/**
 * 会员核销券，用于客服扫码核销使用
 * @version 2023-11-01
 */
@DateBranchTable
@Table(name = "member_verification_voucher")
public class MemberVerificationVoucher {

    @Id
    protected String id;

    @Column(name = "member_id", notNull = true, note = "会员ID")
    protected Long memberId;

    @Column(name = "member_name", note = "会员名称")
    protected String memberName;

    @Column(name = "activity_id", notNull = true,defVal = "0",note = "活动ID，0：代表无关联活动")
    protected Long activityId;

    @Column(name = "voucher_type", notNull = true, note = "凭证类型，1:洗车券")
    protected Integer voucherType;

    @Column(name = "expiration_date", notNull = true, note = "到期时间")
    protected Date expirationDate;

    @Column(name = "source_description",length = 128, note = "来源描述")
    protected String sourceDescription;

    @Column(name = "use_date", type = "DATE",note = "使用时间")
    protected Date useDate;

    @Column(name = "verified_user_id", note = "核销用户ID")
    protected Long verifiedUserId;

    @Column(name = "verified_user_name", note = "核销用户姓名")
    protected String verifiedUserName;

    @Column(notNull = true, defVal = "1", note = "洗车券状态")
    protected Integer state;

    @Column(name = "update_date", autoUpdateTime = true)
    protected Date updateDate;

    @Column(name = "create_date")
    protected Date createDate;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Long getMemberId() {
        return memberId;
    }

    public void setMemberId(Long memberId) {
        this.memberId = memberId;
    }

    public String getMemberName() {
        return memberName;
    }

    public void setMemberName(String memberName) {
        this.memberName = memberName;
    }

    public Integer getVoucherType() {
		return voucherType;
	}

	public void setVoucherType(Integer voucherType) {
		this.voucherType = voucherType;
	}

	public Date getExpirationDate() {
        return expirationDate;
    }

    public void setExpirationDate(Date expirationDate) {
        this.expirationDate = expirationDate;
    }

    public String getSourceDescription() {
        return sourceDescription;
    }

    public void setSourceDescription(String sourceDescription) {
        this.sourceDescription = sourceDescription;
    }

    public Date getUseDate() {
        return useDate;
    }

    public void setUseDate(Date useDate) {
        this.useDate = useDate;
    }

    public Long getVerifiedUserId() {
        return verifiedUserId;
    }

    public void setVerifiedUserId(Long verifiedUserId) {
        this.verifiedUserId = verifiedUserId;
    }

    public String getVerifiedUserName() {
        return verifiedUserName;
    }

    public void setVerifiedUserName(String verifiedUserName) {
        this.verifiedUserName = verifiedUserName;
    }

    public Long getActivityId() {
        return activityId;
    }

    public void setActivityId(Long activityId) {
        this.activityId = activityId;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public String getStateName(){
        return MemberVerificationVoucherEnum.State.note(this.state);
    }
}
